
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人中心</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<link rel="stylesheet" href="css/aui.css" />
	<link href="css/my.css" rel="stylesheet" type="text/css" />
	<link href="js/layer/need/layer.css" rel="stylesheet" type="text/css" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<style>

</style>
<body class="aui-background-white">
	
<section class="aui-flexView" >
	
	<section class="aui-scrollView">
		
		<div class="aui-mine-box">
			<div class="aui-center-bgc aui-padded-b-15 aui-padded-t-15">
				
				<div class="aui-flex aui-padded-t-15">
					<div class="aui-user-img">
						<img src="images/user.png" alt="" id="header" class="userImg">
						<input type="file" class="aui-hide" id="file" onchange="uploadImg()"/>
					</div>
					<div class="aui-flex-box aui-text-white">
						<h2 class="aui-text-white" id="name">李嘉桦</h2>
						<p class="aui-text-white aui-font-size-12">余额 <b id="score">0</b></p>
					</div>
					
				</div>
				<!--<div class="aui-clearfix aui-text-white aui-margin-b-15">
					<div class="aui-col-xs-6 aui-text-center">
						<a href="user-myClass.html" class="aui-text-white">
							<h2>0</h2>
							<p class="aui-text-white">我的课程</p>
						</a>
						
					</div>
					<div class="aui-col-xs-6 aui-text-center">
						<a href="user-pigai.html" class="aui-text-white">
							<h2>0</h2>
							<p class="aui-text-white">我的批改</p>
						</a>
					</div>
				</div>-->
			</div>
			
			<div class="aui-clearfix aui-center-col aui-background-white">
				<div class="aui-col-xs-3 aui-text-center">
					<a href="user-jifen.html">
						<img src="images/center_1.png" class="aui-center-img"/>
						<p class="aui-text-three">我的余额</p>
					</a>
				</div>
				<div class="aui-col-xs-3 aui-text-center">
					<a href="user-myClass.html">
						<img src="images/center_2.png" class="aui-center-img"/>
						<p class="aui-text-three">我的课程</p>
					</a>
				</div>
				<div class="aui-col-xs-3 aui-text-center">
					<a href="myTougao.html">
						<img src="images/center_3.png" class="aui-center-img"/>
						<p class="aui-text-three">我的投稿</p>
					</a>
				</div>
				<div class="aui-col-xs-3 aui-text-center">
					<a href="user-pigai.html">
						<img src="images/center_5.png" class="aui-center-img"/>
						<p class="aui-text-three">我的批改</p>
					</a>
				</div>				
			</div>
			<div class="aui-mine-list">
				<div class="divHeight"></div>
				 <!-- <a href="user-share.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-002.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>邀请好友</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>	 -->		 	
				
				<!--<a href="user-setting.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-008.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>用户设置</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>-->
				<a href="user-setName.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-001.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>昵称修改</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>
				<a href="user-settingPass.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-005.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>修改密码</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>
				<a href="#" class="aui-flex b-line" onclick="checknc()">
					<div class="aui-cou-img">
						<img src="images/icon-item-008.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>清除缓存</p>
					</div>
					<div class="aui-arrow">
						<span id="nc">12M</span>
					</div>
				</a>
				<a href="user-fankui.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-007.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>意见反馈</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>
				<a href="aboutUs.html" class="aui-flex b-line">
					<div class="aui-cou-img">
						<img src="images/icon-item-003.png" alt="">
					</div>
					<div class="aui-flex-box">
						<p>关于我们</p>
					</div>
					<div class="aui-arrow">
						<span></span>
					</div>
				</a>
				<a href="javascript:void(0)" class="aui-flex" onclick="loginout()">
					<button class="aui-text-center aui-text-white aui-width-one aui-padded-t-10 aui-padded-b-10 aui-font-size-14" style="background: #b3d3ec;height: 2rem;">
						退出登录
					</button>
					
				</a>
				
			</div>
		</div>
	</section>
	<div class="aui-inner-wrap">
		   <footer class="aui-footer aui-footer-fixed">
		    <a href="index.html" class="aui-tabBar-item ">
			     <span class="aui-tabBar-item-icon">
	                 <i class="icon icon-syw"></i>
	             </span>
			     <span class="aui-tabBar-item-text">首页</span>
		    </a>
		    <a href="map.html" class="aui-tabBar-item">
					<span class="aui-tabBar-item-icon">
	                    <i class="icon icon-dtw"></i>
	                </span>
					<span class="aui-tabBar-item-text">地图</span>
				</a>
				<a href="textList.html" class="aui-tabBar-item ">
					<span class="aui-tabBar-item-icon">
	                    <i class="icon icon-tgw"></i>
	                </span>
					<span class="aui-tabBar-item-text">投稿</span>
				</a>
				<a href="my.html" class="aui-tabBar-item aui-tabBar-item-active">
					<span class="aui-tabBar-item-icon">
	                    <i class="icon icon-wd"></i>
	                </span>
					<span class="aui-tabBar-item-text">我的</span>
				</a>
			</footer>
		</div>
</section>
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/islogin.js"></script>
<script src="js/layer/layer.js"></script>
<script type="text/javascript">
	var static_url = 'http://kt.zhangzhengjiang.top/';
	var avatar = window.localStorage.getItem('avatar');
	var nickname = window.localStorage.getItem('nicknmame');
	var score = window.localStorage.getItem('score');
	$('#header').attr('src',static_url+avatar);
	$('#name').html(nickname);
	$('#score').html(score);
	
	$('.userImg').click(function(){
		$(this).next().click()
	})
	function uploadImg() {
	    var formData = new FormData();
	    var file = document.getElementById("file").files[0];
	    formData.append("file", file);
		formData.append("uid", window.localStorage.getItem('uid'));
	    $.ajax({
	      url:static_url+"api/index/upload",
	      type:"POST",
	      data:formData,
	      processData : false,
	      contentType : false,
	      dataType : 'json',
	      async : false,
	      success : function (result) {
	        if (result.code ==1) {
				window.localStorage.setItem('avatar',result.data.url);
	        	$('#header').attr('src',static_url+result.data.url);
	        }
	      }    
	    })
	}
	function checknc(){
		layer.open({
			content: '清除成功'
			,skin: 'msg'
			,time: 2 ,//2秒后自动关闭
			
		});
		$('#nc').html('0M');
	}
	function loginout(){
		window.localStorage.clear();
		location.href='./login.html';
	}
</script>
</body>

</html>
